<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>

<!-- javascript 영역-->
<script type="text/javascript" >
    var checkUserId = '<spring:message code="message.null.check.userid" arguments=""/>';
    var checkUserPasswd = '<spring:message code="message.null.check.password" arguments=""/>';
    var notUserInfo = '<fmt:message key="message.login.fail" />';
</script>
<script type="text/javascript">
var selectLogout;
$(function () {
    $('.closeBtn').click(function(){
        $('.layerPop').hide();
        $('#mask').hide();
    });
    
 // 로그 아웃 링크 클릭
    selectLogout = function(){
    	var params = {
    	};

    	$.ajax({
    			url : "/lg/ajax/selectLogout.do"
    			,type : "POST"
    			,dataType : "json"
    			,data : params
    			,success : function(data) {
    				alert(data.resultMsg);
    				location.reload();
    			 }
    	});
    };
});

</script>
<nav id="nav" style="color: white;">
	<c:choose>
		<c:when test="${userSession.user_id != null}">
			${userSession.user_name} 회원님 안녕하세요. <a href="javascript:selectLogout();" id="selectLogout">Logout</a>
		</c:when>
		<c:otherwise>
			<a href="javascript:loginLayer();" id="login">Login</a>
		</c:otherwise>
	</c:choose>
 
	<ul>
	<c:forEach var="menu1" items="${userMenuMap['MN000000']}" varStatus="status">
		<li><a href="${menu1.menu_url }">${menu1.menu_name }</a>
		<c:set var="menuKey" value="${menu1.menu_id}"></c:set>
		<ul>
		<c:forEach var="menu2" items="${userMenuMap[menuKey]}" varStatus="status">
		<li><a href="${menu2.menu_url }">${menu2.menu_name }</a>
		</c:forEach>
		</ul>
		</li>
	</c:forEach>
		
	</ul>
</nav>
